{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "+----------+------------------+------------------------------------------+---------------+--------------------------+------------------+\n",
      "|   时间   |      星期一      |                  星期二                  |     星期三    |          星期四          |      星期五      |\n",
      "+----------+------------------+------------------------------------------+---------------+--------------------------+------------------+\n",
      "|    1     |                  |                                          |               |                          |                  |\n",
      "|   8:00   |                  |                                          |               |                          |                  |\n",
      "| -------- |                  |                 用户研究                 |  大学英语(三) |                          |   大学英语(三)   |\n",
      "|    2     |                  |                                          |               |                          |                  |\n",
      "|   8:50   |                  |                                          |               |                          |                  |\n",
      "| -------- | ---------------- |             ----------------             |               |     ----------------     | ---------------- |\n",
      "|    3     |                  |                                          |               |                          |                  |\n",
      "|   9:45   |                  |                                          |               |                          |                  |\n",
      "| -------- |                  |                                          |               |                          | ---------------- |\n",
      "|    4     |    python语言    |                                          |   融合新闻学  |                          |  创业基础(实践)  |\n",
      "|  10:35   |                  |                                          |               |                          |                  |\n",
      "| -------- |                  | 毛泽东思想和中国特色社会主义理论体系概论 |               | 近现代中外政治与文化交流 |       武术       |\n",
      "|    5     |                  |                                          |               |                          |                  |\n",
      "|  11:20   |                  |                                          |               |                          |                  |\n",
      "| -------- | ---------------- |             ----------------             |               |     ----------------     | ---------------- |\n",
      "|    6     |                  |                                          |               |                          |                  |\n",
      "|  12:50   |                  |                                          |               |                          |                  |\n",
      "| -------- |    写作训练      |                                          |               |                          |                  |\n",
      "|    7     |                  |                                          |               |                          |                  |\n",
      "|  13:40   |                  |                                          |               |                          |                  |\n",
      "| -------- | ---------------- |             ----------------             |               |     ----------------     |                  |\n",
      "|    8     |                  |                                          |               |                          |                  |\n",
      "|  14:30   |                  |                                          |               |                          |                  |\n",
      "| -------- |      太极拳      |          新媒体时代的新闻评论            |               |       广告文案写作       |                  |\n",
      "|    9     |                  |                                          |               |                          |                  |\n",
      "|  15:15   |                  |                                          |               |                          |                  |\n",
      "| -------- |                  |             ----------------             |               |     ----------------     |                  |\n",
      "|    10    |                  |                                          |               |                          |                  |\n",
      "|  16:10   |                  |                                          |               |                          |                  |\n",
      "| -------- |                  |                                          |               |                          |                  |\n",
      "|    11    |                  |                                          |               |                          |                  |\n",
      "|  16:55   |                  |                                          |               |                          |                  |\n",
      "| -------- |                  |             ----------------             |               |                          |                  |\n",
      "|    12    |                  |                                          |               |                          |                  |\n",
      "|  18:45   |                  |                                          |               |                          |                  |\n",
      "| -------- |                  |                                          |               |                          |                  |\n",
      "|    13    |                  |                毛概理论                  | Excel数据分析 |                          |                  |\n",
      "|  19:30   |                  |                                          |               |                          |                  |\n",
      "| -------- | ---------------- |                                          |               |                          |                  |\n",
      "|    14    |                  |                                          |               |                          |                  |\n",
      "|  20:15   |                  |                                          |               |                          |                  |\n",
      "| -------- |                  |             ----------------             |               |                          |                  |\n",
      "|    15    |                  |                                          |               |                          |                  |\n",
      "|  21:05   |                  |                                          |               |                          |                  |\n",
      "+----------+------------------+------------------------------------------+---------------+--------------------------+------------------+\n"
     ]
    }
   ],
   "source": [
    "import sys\n",
    "from prettytable import PrettyTable\n",
    "\n",
    "table = PrettyTable(['时间','星期一','星期二','星期三','星期四','星期五'])\n",
    "table.add_row(['1\\n8:00','','','','',''])\n",
    "table.add_row(['--------','','用户研究','大学英语(三)','','大学英语(三)'])\n",
    "table.add_row(['2\\n8:50','','','','',''])\n",
    "table.add_row(['--------','----------------','----------------','','----------------','----------------'])\n",
    "table.add_row(['3\\n9:45','','','','',''])\n",
    "table.add_row(['--------','','','','','----------------'])\n",
    "table.add_row(['4\\n10:35','python语言',' ','融合新闻学','','创业基础(实践)'])\n",
    "table.add_row(['--------','','毛泽东思想和中国特色社会主义理论体系概论','','近现代中外政治与文化交流','武术'])\n",
    "table.add_row(['5\\n11:20','','','','',''])\n",
    "table.add_row(['--------','----------------','----------------','','----------------','----------------'])\n",
    "table.add_row(['6\\n12:50','','','','',''])\n",
    "table.add_row(['--------','写作训练 ','','','',''])\n",
    "table.add_row(['7\\n13:40','','','','',''])\n",
    "table.add_row(['--------','----------------','----------------','','----------------',''])\n",
    "table.add_row(['8\\n14:30',' ','','','',''])\n",
    "table.add_row(['--------','太极拳','新媒体时代的新闻评论 ','','广告文案写作',''])\n",
    "table.add_row(['9\\n15:15','','','','',''])\n",
    "table.add_row(['--------','','----------------','','----------------',''])\n",
    "table.add_row(['10\\n16:10','','','','',''])\n",
    "table.add_row(['--------','',' ','','',''])\n",
    "table.add_row(['11\\n16:55','','','','',''])\n",
    "table.add_row(['--------','','----------------','','',''])\n",
    "table.add_row(['12\\n18:45','','','','',''])\n",
    "table.add_row(['--------','','','','',''])\n",
    "table.add_row(['13\\n19:30','','毛概理论 ','Excel数据分析','',''])\n",
    "table.add_row(['--------','----------------','','','',''])\n",
    "table.add_row(['14\\n20:15','','','','',''])\n",
    "table.add_row(['--------',' ','----------------','','',''])\n",
    "table.add_row(['15\\n21:05','','','','',''])\n",
    "print(table)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print(\"课程表\")\n",
    "import datetime\n",
    "time = datetime.datetime.today().weekday()\n",
    "week_time = int(time)\n",
    "print(week_time)\n",
    "if week_time==0:\n",
    "    print(\"星期一有三节课\");print(\"3-5python语言\");print(\"6-7写作训练\");print(\"8-9太极拳\")\n",
    "elif week_time==1:\n",
    "    print(\"星期二有四节课\");print(\"1-3用户研究\");print(\"4-5毛泽东思想和中国特色社会主义理论体系概论\");print(\"12-13毛概理论\")\n",
    "elif week_time==2:\n",
    "    print(\"星期三有三节课\");print(\"1-2大英\");print(\"3-5融合新闻学\");print(\"12-14Excel数据分析\")\n",
    "elif week_time==3:\n",
    "    print(\"星期四有两节课\");print(\"4-5近现代中外政治与文化交流\");print(\"8-9广告文案写作\")\n",
    "elif week_time==4:\n",
    "    print(\"星期五有两节课\");print(\"1-2大英\");print(\"3-5创业基础实践\")\n",
    "else:\n",
    "    print(\"喜提周六和周日\");print(\"周末愉快\")\n",
    "print(\"FINISH\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
